# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Simon Perry <aur [at] sanxion [dot] net>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>

pkgname=perl-list-compare
_pkgname=List-Compare
pkgver=0.55
pkgrel=1
pkgdesc="Compare elements of two or more lists"
arch=('any')
url="https://metacpan.org/release/List-Compare"
license=('GPL' 'PerlArtistic')
depends=('perl')
makedepends=('perl-capture-tiny')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/J/JK/JKEENAN/${_pkgname}-$pkgver.tar.gz) 
sha256sums=('cc719479836579d52b02bc328ed80a98f679df043a99b5710ab2c191669eb837')

build() {
  cd $_pkgname-$pkgver

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd $_pkgname-$pkgver
  make test
}

package() {
  cd $_pkgname-$pkgver

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -name perllocal.pod -delete
  find "$pkgdir" -name .packlist -delete
}
